﻿using Markdig;
using Nxg.Blog.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Nxg.Blog.Web.Features
{
    public class MarkdownTransformer : IMarkdownTransformer
    {
        public string Transform(string input)
        {
            var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
            var result = Markdown.ToHtml(input, pipeline);
            return result;
        }
    }
}
